package com.example.myapplication.provider;

public final class BlogContract {

    // 内部类，定义博客表的常量
    public static class BlogEntry{
        // 表名
        public static final String TABLE_NAME = "blog";

        // 列名
        public static final String COLUMN_NAME_ID = "id";
        public static final String COLUMN_NAME_TITLE = "title";
        public static final String COLUMN_NAME_CONTENT = "content";

        // 定义数据库创建语句
        public static final String SQL_CREATE_ENTRIES =
                "CREATE TABLE " + TABLE_NAME + " (" +
                        COLUMN_NAME_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
                        COLUMN_NAME_TITLE + " TEXT," +
                        COLUMN_NAME_CONTENT + " TEXT" +
                        ")";

        // 定义数据库删除语句
        public static final String SQL_DELETE_ENTRIES =
                "DROP TABLE IF EXISTS " + TABLE_NAME;
    }
}